
const Koa = require("koa");

const { koaSwagger } = require("koa2-swagger-ui");

const swagger = require("../utils/swagger");


const userRouter = require("../router/user.route");

const app = new Koa();

app.use(swagger.routes(), swagger.allowedMethods());

app.use(
  koaSwagger({
    routePrefix: '/swagger', // host at /swagger instead of default /docs
    swaggerOptions: {
      url: '/swagger.json', // example path to json
    },
  }),
);

app.use(userRouter.routes());

app.listen(3000);